{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "initial_id",
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": "#  Pandas的函数应用"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T03:19:05.170173Z",
     "start_time": "2025-02-12T03:19:03.292959Z"
    }
   },
   "cell_type": "code",
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "# Numpy ufunc 函数，randn跟的是维数\n",
    "df = pd.DataFrame(np.random.randn(5,4) - 1)\n",
    "print(df)\n",
    "\n",
    "print(np.abs(df)) #绝对值"
   ],
   "id": "8ca65d285c43e068",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          0         1         2         3\n",
      "0 -0.094281 -0.623256 -0.186467  0.129190\n",
      "1  0.928441 -0.273205 -0.503342 -1.049367\n",
      "2 -0.880339 -0.933134 -0.151210 -0.706931\n",
      "3 -1.592405 -2.493735 -2.141337 -0.040137\n",
      "4 -2.993772 -1.177312 -1.065076 -0.543272\n",
      "          0         1         2         3\n",
      "0  0.094281  0.623256  0.186467  0.129190\n",
      "1  0.928441  0.273205  0.503342  1.049367\n",
      "2  0.880339  0.933134  0.151210  0.706931\n",
      "3  1.592405  2.493735  2.141337  0.040137\n",
      "4  2.993772  1.177312  1.065076  0.543272\n"
     ]
    }
   ],
   "execution_count": 1
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:30:01.429350Z",
     "start_time": "2025-02-12T06:30:01.376697Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#apply默认作用在列上,x是每一列,因为axis=0\n",
    "print(df.apply(lambda x : x.max()))"
   ],
   "id": "2df4ddccd414e7eb",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0    0.928441\n",
      "1   -0.273205\n",
      "2   -0.151210\n",
      "3    0.129190\n",
      "dtype: float64\n"
     ]
    }
   ],
   "execution_count": 2
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:30:29.929941Z",
     "start_time": "2025-02-12T06:30:29.923921Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#apply作用在行上\n",
    "print(df.apply(lambda x : x.max(), axis=1))"
   ],
   "id": "345ded28edfc2a2b",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0    0.129190\n",
      "1    0.928441\n",
      "2   -0.151210\n",
      "3   -0.040137\n",
      "4   -0.543272\n",
      "dtype: float64\n"
     ]
    }
   ],
   "execution_count": 3
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:30:50.635961Z",
     "start_time": "2025-02-12T06:30:50.617435Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 使用applymap应用到每个数据\n",
    "print(df.map(lambda x : '%.2f' % x))\n",
    "df.dtypes"
   ],
   "id": "40625bf239027ebe",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "       0      1      2      3\n",
      "0  -0.09  -0.62  -0.19   0.13\n",
      "1   0.93  -0.27  -0.50  -1.05\n",
      "2  -0.88  -0.93  -0.15  -0.71\n",
      "3  -1.59  -2.49  -2.14  -0.04\n",
      "4  -2.99  -1.18  -1.07  -0.54\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0    float64\n",
       "1    float64\n",
       "2    float64\n",
       "3    float64\n",
       "dtype: object"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 4
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:31:00.644101Z",
     "start_time": "2025-02-12T06:31:00.638478Z"
    }
   },
   "cell_type": "code",
   "source": "type('%.2f' % 1.3456)",
   "id": "40a3929d4e453a1c",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "str"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 5
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 索引排序（不重要）",
   "id": "545872f7277abee9"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:31:41.790224Z",
     "start_time": "2025-02-12T06:31:41.777611Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# Series\n",
    "print(np.random.randint(5, size=5))\n",
    "print('-'*50)\n",
    "s4 = pd.Series(range(10, 15), index = np.random.randint(5, size=5)) #索引随机生成\n",
    "print(s4)\n",
    "print('-'*50)\n",
    "# 索引排序,sort_index返回一个新的排好索引的series\n",
    "print(s4.sort_index())\n",
    "print(s4)\n",
    "# s4.loc[0:3]  loc索引值不唯一时直接报错\n",
    "print(s4.iloc[0:3])\n",
    "s4[0:3]  #默认用的位置索引"
   ],
   "id": "36905559626e4cd0",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1 1 1 1 2]\n",
      "--------------------------------------------------\n",
      "3    10\n",
      "1    11\n",
      "0    12\n",
      "1    13\n",
      "3    14\n",
      "dtype: int64\n",
      "--------------------------------------------------\n",
      "0    12\n",
      "1    11\n",
      "1    13\n",
      "3    10\n",
      "3    14\n",
      "dtype: int64\n",
      "3    10\n",
      "1    11\n",
      "0    12\n",
      "1    13\n",
      "3    14\n",
      "dtype: int64\n",
      "3    10\n",
      "1    11\n",
      "0    12\n",
      "dtype: int64\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "3    10\n",
       "1    11\n",
       "0    12\n",
       "dtype: int64"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 6
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:33:11.269179Z",
     "start_time": "2025-02-12T06:33:11.260860Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# DataFrame\n",
    "df4 = pd.DataFrame(np.random.randn(5, 5),\n",
    "                   index=np.random.randint(5, size=5),\n",
    "                   columns=np.random.randint(5, size=5))\n",
    "print(df4)\n",
    "#轴零是行索引排序\n",
    "df4_isort = df4.sort_index(axis=0, ascending=True)\n",
    "print(df4_isort)\n"
   ],
   "id": "17d4a0fd35d22c19",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          3         4         1         2         0\n",
      "4 -1.921774 -1.341082  0.237372  0.937855 -0.074500\n",
      "4 -0.899194  0.729954  0.403555  1.098231 -0.217040\n",
      "0 -0.278191  0.685023 -0.748892 -1.037621  0.100015\n",
      "4  2.059237  0.509245 -0.235053 -1.371714 -0.487022\n",
      "0 -1.045233  0.431772  0.348832  1.161343  0.703263\n",
      "          3         4         1         2         0\n",
      "0 -0.278191  0.685023 -0.748892 -1.037621  0.100015\n",
      "0 -1.045233  0.431772  0.348832  1.161343  0.703263\n",
      "4 -0.899194  0.729954  0.403555  1.098231 -0.217040\n",
      "4 -1.921774 -1.341082  0.237372  0.937855 -0.074500\n",
      "4  2.059237  0.509245 -0.235053 -1.371714 -0.487022\n"
     ]
    }
   ],
   "execution_count": 8
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:33:22.651309Z",
     "start_time": "2025-02-12T06:33:22.644790Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#轴1是列索引排序\n",
    "df4_isort = df4.sort_index(axis=1, ascending=True)\n",
    "print(df4_isort)"
   ],
   "id": "1db2ba3088ece020",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          0         1         2         3         4\n",
      "4 -0.074500  0.237372  0.937855 -1.921774 -1.341082\n",
      "4 -0.217040  0.403555  1.098231 -0.899194  0.729954\n",
      "0  0.100015 -0.748892 -1.037621 -0.278191  0.685023\n",
      "4 -0.487022 -0.235053 -1.371714  2.059237  0.509245\n",
      "0  0.703263  0.348832  1.161343 -1.045233  0.431772\n"
     ]
    }
   ],
   "execution_count": 9
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "#  按值排序（机器学习，深度学习不重要，数据分析才需要）",
   "id": "6192378af3469ff6"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:36:58.987391Z",
     "start_time": "2025-02-12T06:36:58.980174Z"
    }
   },
   "cell_type": "code",
   "source": [
    "# 按值排序,by后是column的值\n",
    "import random\n",
    "l=[random.randint(0,100) for i in range(24)] #生成24个随机数\n",
    "df4 = pd.DataFrame(np.array(l).reshape(6,4)) #生成6行4列的dataframe\n",
    "# print(df4) #查看数据,ndarray\n",
    "# print('-'*50)\n",
    "print(df4)\n",
    "print('-'*50)\n",
    "#按轴零排序，by后是列名,交换的是行  如果按照轴一排序，交换的是列\n",
    "df4_vsort = df4.sort_values(by=3,axis=1, ascending=False) #寻找的是columns里的3,重要\n",
    "print(df4_vsort)\n"
   ],
   "id": "e320c05986043048",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    0   1   2   3\n",
      "0  34  84  87  26\n",
      "1  21  92  70  84\n",
      "2  62  54  93  71\n",
      "3  33  46   9  96\n",
      "4  15  18  90  88\n",
      "5  22  21   5  30\n",
      "--------------------------------------------------\n",
      "    3   1   0   2\n",
      "0  26  84  34  87\n",
      "1  84  92  21  70\n",
      "2  71  54  62  93\n",
      "3  96  46  33   9\n",
      "4  88  18  15  90\n",
      "5  30  21  22   5\n"
     ]
    }
   ],
   "execution_count": 11
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:37:56.930986Z",
     "start_time": "2025-02-12T06:37:56.926179Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#按轴1排序，by后行索引名，交换的是列\n",
    "df4_vsort = df4.sort_values(by=3,axis=1, ascending=False) #寻找的是index里的3\n",
    "print(df4_vsort)"
   ],
   "id": "23f0a71bb6543395",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    3   1   0   2\n",
      "0  26  84  34  87\n",
      "1  84  92  21  70\n",
      "2  71  54  62  93\n",
      "3  96  46  33   9\n",
      "4  88  18  15  90\n",
      "5  30  21  22   5\n"
     ]
    }
   ],
   "execution_count": 12
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "# 处理缺失数据（重要）",
   "id": "cf52b7611996abd1"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:50:43.347696Z",
     "start_time": "2025-02-12T06:50:43.341664Z"
    }
   },
   "cell_type": "code",
   "source": [
    "df_data = pd.DataFrame([np.random.randn(3), [1., 2., np.nan],\n",
    "                       [np.nan, 4., np.nan], [1., 2., 3.]])\n",
    "print(df_data.head())\n",
    "print(df_data)"
   ],
   "id": "bcf9c157fb502482",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          0         1         2\n",
      "0 -0.069624 -0.006924  0.676247\n",
      "1  1.000000  2.000000       NaN\n",
      "2       NaN  4.000000       NaN\n",
      "3  1.000000  2.000000  3.000000\n",
      "          0         1         2\n",
      "0 -0.069624 -0.006924  0.676247\n",
      "1  1.000000  2.000000       NaN\n",
      "2       NaN  4.000000       NaN\n",
      "3  1.000000  2.000000  3.000000\n"
     ]
    }
   ],
   "execution_count": 17
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:51:04.265069Z",
     "start_time": "2025-02-12T06:51:04.260106Z"
    }
   },
   "cell_type": "code",
   "source": "df_data.iloc[2,0]",
   "id": "9c073815a72af27d",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "np.float64(nan)"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 19
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:51:24.096273Z",
     "start_time": "2025-02-12T06:51:24.090646Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#isnull来判断是否有空的数据\n",
    "print(df_data.isnull())"
   ],
   "id": "5b0420cc15311979",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "       0      1      2\n",
      "0  False  False  False\n",
      "1  False  False   True\n",
      "2   True  False   True\n",
      "3  False  False  False\n"
     ]
    }
   ],
   "execution_count": 20
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:56:56.580270Z",
     "start_time": "2025-02-12T06:56:56.574896Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#帮我计算df_data缺失率\n",
    "print(df_data.isnull().sum()/len(df_data))\n",
    "#这里的长度是行数\n",
    "print(''*50)\n",
    "# print(df_data.isull().sum())\n",
    "print(len(df_data))\n",
    "print('#'*50)\n"
   ],
   "id": "85314221e2af72e7",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0    0.25\n",
      "1    0.00\n",
      "2    0.50\n",
      "dtype: float64\n",
      "\n",
      "4\n",
      "##################################################\n"
     ]
    }
   ],
   "execution_count": 33
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "## 删除缺失数据",
   "id": "b83931bacb74f03d"
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "",
   "id": "a64b391da9b5de1c"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T06:57:48.185021Z",
     "start_time": "2025-02-12T06:57:48.176311Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#默认一个样本，任何一个特征缺失，就删除\n",
    "#inplace True是修改的是原有的df\n",
    "#subset=[0]是指按第一列来删除,第一列有空值就删除对应的行\n",
    "print(df_data.dropna(subset=[0]))\n",
    "df_data"
   ],
   "id": "6a1465b87e5f7ec2",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          0         1         2\n",
      "0 -0.069624 -0.006924  0.676247\n",
      "1  1.000000  2.000000       NaN\n",
      "3  1.000000  2.000000  3.000000\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "          0         1         2\n",
       "0 -0.069624 -0.006924  0.676247\n",
       "1  1.000000  2.000000       NaN\n",
       "2       NaN  4.000000       NaN\n",
       "3  1.000000  2.000000  3.000000"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-0.069624</td>\n",
       "      <td>-0.006924</td>\n",
       "      <td>0.676247</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 36
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "",
   "id": "44d0b2d6f3118df0"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T07:03:26.423116Z",
     "start_time": "2025-02-12T07:03:26.417353Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#用的不多，用在某个特征缺失太多时，才会进行删除\n",
    "print(df_data.dropna(axis=1))  #某列由nan就删除该列"
   ],
   "id": "d0cb2c6120cffb2a",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "          1\n",
      "0 -0.006924\n",
      "1  2.000000\n",
      "2  4.000000\n",
      "3  2.000000\n"
     ]
    }
   ],
   "execution_count": 38
  },
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "## 填充缺失数据",
   "id": "230fddc642439b28"
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T07:03:52.034884Z",
     "start_time": "2025-02-12T07:03:52.027307Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#给零列的空值填为-100，按特征（按列）去填充\n",
    "print(df_data.iloc[:,0].fillna(-100.))\n",
    "df_data"
   ],
   "id": "b60f5ef87cef0254",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0     -0.069624\n",
      "1      1.000000\n",
      "2   -100.000000\n",
      "3      1.000000\n",
      "Name: 0, dtype: float64\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "          0         1         2\n",
       "0 -0.069624 -0.006924  0.676247\n",
       "1  1.000000  2.000000       NaN\n",
       "2       NaN  4.000000       NaN\n",
       "3  1.000000  2.000000  3.000000"
      ],
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>0</th>\n",
       "      <th>1</th>\n",
       "      <th>2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-0.069624</td>\n",
       "      <td>-0.006924</td>\n",
       "      <td>0.676247</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>4.000000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1.000000</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>3.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 39
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T07:06:16.705051Z",
     "start_time": "2025-02-12T07:06:16.699685Z"
    }
   },
   "cell_type": "code",
   "source": [
    "#依次拿到每一列\n",
    "for i in df_data.columns:\n",
    "    print(df_data.loc[:,i])\n",
    "print('*'*50)    \n",
    "# df_data.columns\n",
    "print(df_data.loc[:,0])"
   ],
   "id": "a5521b4a9a3a3703",
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0   -0.069624\n",
      "1    1.000000\n",
      "2         NaN\n",
      "3    1.000000\n",
      "Name: 0, dtype: float64\n",
      "0   -0.006924\n",
      "1    2.000000\n",
      "2    4.000000\n",
      "3    2.000000\n",
      "Name: 1, dtype: float64\n",
      "0    0.676247\n",
      "1         NaN\n",
      "2         NaN\n",
      "3    3.000000\n",
      "Name: 2, dtype: float64\n",
      "**************************************************\n",
      "0   -0.069624\n",
      "1    1.000000\n",
      "2         NaN\n",
      "3    1.000000\n",
      "Name: 0, dtype: float64\n"
     ]
    }
   ],
   "execution_count": 45
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-02-12T07:06:40.516805Z",
     "start_time": "2025-02-12T07:06:40.512105Z"
    }
   },
   "cell_type": "code",
   "source": "df_data.iloc[:,2]=df_data.iloc[:,2].fillna(df_data.iloc[:,2].mean()) #用均值填充空值",
   "id": "9ddc3f7d96b02c91",
   "outputs": [],
   "execution_count": 46
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
